package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the per_tng_pojs database table.
 * 
 */
@Entity
@Table(name="per_tng_pojs")
@NamedQuery(name="PerTngPojs.findAll", query="SELECT p FROM PerTngPojs p")
public class PerTngPojs implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_TNG_POJS_POJSID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_TNG_POJS_POJSID_GENERATOR")
	private int pojsid;

	private Timestamp pojstime;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp;

	//bi-directional many-to-one association to PerTngPlan
	@ManyToOne
	@JoinColumn(name="PLANID")
	private PerTngPlan perTngPlan;

	//bi-directional many-to-one association to PerTngXes
	@OneToMany(mappedBy="perTngPoj")
	private List<PerTngXes> perTngXes;

	//bi-directional many-to-one association to PerTngXks
	@OneToMany(mappedBy="perTngPoj")
	private List<PerTngXks> perTngXks;

	public PerTngPojs() {
	}

	public int getPojsid() {
		return this.pojsid;
	}

	public void setPojsid(int pojsid) {
		this.pojsid = pojsid;
	}

	public Timestamp getPojstime() {
		return this.pojstime;
	}

	public void setPojstime(Timestamp pojstime) {
		this.pojstime = pojstime;
	}

	public PerPmsEmp getPerPmsEmp() {
		return this.perPmsEmp;
	}

	public void setPerPmsEmp(PerPmsEmp perPmsEmp) {
		this.perPmsEmp = perPmsEmp;
	}

	public PerTngPlan getPerTngPlan() {
		return this.perTngPlan;
	}

	public void setPerTngPlan(PerTngPlan perTngPlan) {
		this.perTngPlan = perTngPlan;
	}

	public List<PerTngXes> getPerTngXes() {
		return this.perTngXes;
	}

	public void setPerTngXes(List<PerTngXes> perTngXes) {
		this.perTngXes = perTngXes;
	}

	public PerTngXes addPerTngXe(PerTngXes perTngXe) {
		getPerTngXes().add(perTngXe);
		perTngXe.setPerTngPoj(this);

		return perTngXe;
	}

	public PerTngXes removePerTngXe(PerTngXes perTngXe) {
		getPerTngXes().remove(perTngXe);
		perTngXe.setPerTngPoj(null);

		return perTngXe;
	}

	public List<PerTngXks> getPerTngXks() {
		return this.perTngXks;
	}

	public void setPerTngXks(List<PerTngXks> perTngXks) {
		this.perTngXks = perTngXks;
	}

	public PerTngXks addPerTngXk(PerTngXks perTngXk) {
		getPerTngXks().add(perTngXk);
		perTngXk.setPerTngPoj(this);

		return perTngXk;
	}

	public PerTngXks removePerTngXk(PerTngXks perTngXk) {
		getPerTngXks().remove(perTngXk);
		perTngXk.setPerTngPoj(null);

		return perTngXk;
	}

}